Declarative Debugging with Buddha

نویسنده

  • Bernard J. Pope
چکیده

Haskell is a very safe language, particularly because of its type system. However there will always be programs that do the wrong thing. Programmer fallibility, partial or incorrect specifications and typographic errors are but a few of the reasons that make bugs a fact of life. This paper is about the use and implementation of a debugger, called Buddha, which helps Haskell programmers understand why their programs misbehave. Traditional debugging tools that examine the program execution step-by-step are not suitable for Haskell because of its unorthodox evaluation strategy. Instead, a different approach is taken which abstracts away the evaluation order of the program and focuses on its high-level logical meaning. This style of debugging is called Declarative Debugging, and it has its roots in the Logic Programming community. At the heart of the debugger is a tree which records information about the evaluation of the program in a manner which is easy to relate to the structure of the source code. It resembles a call graph annotated with the arguments and results of function applications, shown in their most evaluated form. Logical relationships between entities in the source are reflected in the links between nodes in the tree. An error diagnosis algorithm is applied to the tree in a top-down fashion in the search for causes of bugs.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Debugging for a Declarative Programming Language

This paper investigates debugging in declarative programming languages, concentrating specifically on the integrated functional and logic programming language Escher. The Escher language has types and modules, higher-order and meta-programming facilities, and declarative input/output. It also has a collection of system modules, providing numerous operations on standard data types such as intege...

متن کامل

Debugging Prolog Programs Declaratively

Traditional declarative debuggers, despite their theoretical attractions are not considered to be practical tools for debugging of many Prolog programs. This is partly due to the fact that the basic declarative debugging system (Shapiro 83) only dealt with pure Prolog programs, and partly due to practical limitations of the suggested methods and algorithms. Our aim has been to study the applica...

متن کامل

Debugging techniques for declarative languages: Profiling, program slicing and algorithmic debugging

The task of debugging can be arduous. A bug can be evident with a single glance, or it can be hidden in the deepest lurking place of our program. Nevertheless, surprisingly, debugging is one of the software processes that has been mostly abandoned by the scientific community, and the same debugging techniques used twenty years ago are still being used today. The situation is not different regar...

متن کامل

A Debugging Scheme for Declarative Equation Based Modeling Languages

This paper concerns the static analysis for debugging purposes of programs written in declarative equation based modeling languages. We first give an introduction to declarative equation based languages and the consequences equation based programming has for debugging. At the same time, we examine the particular debugging problems posed by Modelica, a declarative equation based modeling languag...

متن کامل

Declarative Debugging of Membership Equational Logic Specifications

Algorithmic debugging has been applied to many declarative programming paradigms; in this paper, it is applied to the rewriting paradigm embodied in Maude. We introduce a declarative debugger for executable specifications in membership equational logic which correspond to Maude functional modules. Declarative debugging is based on the construction and navigation of a debugging tree which logica...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2004